package com.hdu.careerplan.enums;

import lombok.Getter;

@Getter
public enum StatusCode {

    UNKNOWN_ERROR(-1, "An unknown error"),

    SUCCESS(0, "Success"),
    NO_CONTENT(0, "No content"),


    REGISTER_FAILED(401, "Register failed"),  //注册失败
    LOGIN_FAILED(401, "Login failed"),  //登录失败
    NOT_LOGIN(401, "User not login"),
    ILLEGAL_TOKEN(401, "Illegal token"),
    UPDATE_FAILED(401, "Update failed"),  //更新失败
    WRONG_IDENTITY(401, "Wrong identity"),


    ;

    private final Integer code;

    private final String message;

    StatusCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
